//
//  RBTitleButton.m
//  Budejie
//
//  Created by 华杨科技 on 2017/10/15.
//  Copyright © 2017年 饶波. All rights reserved.
//

#import "RBTitleButton.h"

@implementation RBTitleButton

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self=[super initWithFrame:frame]) {
//        self.backgroundColor = [UIColor brownColor];
//        self.titleLabel.backgroundColor = [UIColor whiteColor];
        // 设置按钮文字默认颜色
        [self setTitleColor:[UIColor darkGrayColor] forState:(UIControlStateNormal)];
        [self.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
        
        // 设置按钮的颜色
        //        titleButton.selected = NO;
        [self setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
        //        titleButton.selected = YES;
        [self setTitleColor:[UIColor redColor] forState:UIControlStateSelected];
        
        //        titleButton.selected = NO;
        //        [titleButton setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
        //        //        titleButton.selected = YES;
        //        [titleButton setTitleColor:[UIColor redColor] forState:UIControlStateDisabled];
    }
    return self;
}

// 重写该方法,不调父类方法,取消高亮状态; 看需求
- (void)setHighlighted:(BOOL)highlighted {}

@end
